package com.toplabs.unashu.dto;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.toplabs.unashu.entity.Type;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class PageBlog implements Serializable {
    private static final long serialVersionUID = 8884207122545168620L;
    // Blog
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    private String title;

    private String firstPicture;

    private Integer views;

    private Date createTime;

    private String description;

    //Type
    private List<Type> types = new ArrayList<>();

    private String typeIds;

    //User
    private String nickname;

    private String avatar;
}
